using LiJ.Common.Extention;

namespace LiJ.Framework.Msg.Mos
{
	/// <summary>
	/// 地理位置消息
	/// </summary>
	public class WxLocationRecMsg : WxBaseRecMsg
	{
		/// <summary>
		/// 地理位置纬度
		/// </summary>
		public double Latitude
		{
			get;
			set;
		}

		/// <summary>
		/// 地理位置经度
		/// </summary>
		public double Longitude
		{
			get;
			set;
		}

		/// <summary>
		/// 地图缩放大小
		/// </summary>
		public int Scale
		{
			get;
			set;
		}

		/// <summary>
		/// 地理位置信息
		/// </summary>
		public string Label
		{
			get;
			set;
		}

		/// <summary>
		/// 格式化自身属性部分
		/// </summary>
		protected override void FormatPropertiesFromMsg()
		{
			this.Latitude = base["Location_X"].ToDouble(0.0);
			this.Longitude = base["Location_Y"].ToDouble(0.0);
			this.Scale = base["Scale"].ToInt32(0);
			this.Label = base["Label"];
		}
	}
}
